import { CollectionType } from "./CollectionType";

export type KeywordType = {
  id: string;
  ranks: number;
  keyName: string;
  url: string;
  // typeId: string,
  memo: string;
  typeId?: string | number;
  typeName?: string;
};

export type KeywordListType = KeywordType[];

export type FetchKeywordType = {
  list: KeywordListType;
  total: number;
  pageNo: number;
  pageSize: number;
};

export interface KeywordWithCollectionType extends KeywordType {
  collectionType: CollectionType | null;
}

export type KeywordWithName = { name: string } & KeywordWithCollectionType;

export type PasswordPair = {
  id?: string | number;
  account: string;
  password: string;
  memo: string;
};

export interface PasswordType extends KeywordType {
  pair: PasswordPair[];
}

export type PasswordWithType = PasswordPair & { type: "text" | "password" };
